package org.secangkirkopipanas.gxtcore.server.service.impl;

import java.util.List;

import org.secangkirkopipanas.gxtcore.server.dao.ISystemBusinessUnitDAO;
import org.secangkirkopipanas.gxtcore.server.domain.SystemBusinessUnit;
import org.secangkirkopipanas.gxtcore.server.service.ISystemBusinessUnitService;

public class SystemBusinessUnitService implements ISystemBusinessUnitService {

	private ISystemBusinessUnitDAO systemBusinessUnitDAO;

	public ISystemBusinessUnitDAO getSystemBusinessUnitDAO() {
		return systemBusinessUnitDAO;
	}

	public void setSystemBusinessUnitDAO(
			ISystemBusinessUnitDAO systemBusinessUnitDAO) {
		this.systemBusinessUnitDAO = systemBusinessUnitDAO;
	}

	public void add(SystemBusinessUnit systemBusinessUnit) throws Exception {
		systemBusinessUnitDAO.add(systemBusinessUnit);
	}

	public SystemBusinessUnit get(long unitId) {
		return systemBusinessUnitDAO.get(unitId);
	}

	public SystemBusinessUnit get(String unitName) {
		return systemBusinessUnitDAO.get(unitName);
	}

	public List<SystemBusinessUnit> getBusinessUnitMembers(
			SystemBusinessUnit systemBusinessUnit) {
		return systemBusinessUnitDAO.getBusinessUnitMembers(systemBusinessUnit);
	}

	public List<SystemBusinessUnit> getForList() {
		return systemBusinessUnitDAO.getForList();
	}

	public int getTotalCount() {
		return systemBusinessUnitDAO.getTotalCount();
	}

}
